import { useMutation } from "@tanstack/react-query";

import { login, type LoginRequest, type LoginResponse } from "@/lib/api-client";

export function useLoginMutation() {
  return useMutation<LoginResponse, Error, LoginRequest>({
    mutationFn: (payload) => login(payload),
  });
}
